﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Import Namespace="UE.SharePoint.ImportExport.Resources" %>

<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" Src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" Src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" Src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UploadPage.aspx.cs" 
Inherits="UE.SharePoint.ImportExport.Layouts.UploadPage"
 DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <style type="text/css">
        .div_topDescription
        {
            margin-bottom: 10px;
            margin-right: -16px;
            background: #C9D7E6 url("/_layouts/images/bgximg.png") repeat-x -0px -209px;
            color: #3B4652;
            border-color: #AAAFBE;
            padding: 8px 15px;
            position: relative;
            left: -8px;
            top: -8px;
            border-bottom: 1px solid #bbb;
        }
        .uploadPageSummary
        {
            margin: 0px 15px;
        }
    </style>
    <%if (this.Web.UIVersion == 3)
      { %>
    <style type="text/css">
        .div_topDescription
        {
            background: none !important;
            border: none !important;
        }
    </style>
    <%} %>
    <script type="text/javascript">
        function showLoad() {
            window.document.getElementById('loadinggif').style.display = 'inline';
        }

        function showResult(infomation) {
            alert(infomation);
            if (parent != null) {
                parent.window.Excel_listId = null;
            }
            
            SP.UI.ModalDialog.commonModalDialogClose(1);
        }

        function cancel() {
            SP.UI.ModalDialog.commonModalDialogClose(0);
        }

    </script>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server"> 
    <div class="div_topDescription">  
    <asp:Literal runat="server" ID="litPageDescription" />
    </div>
    <table class="ms-propertysheet" border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>    
            <td width="30%">
            </td>
            <td>
            </td>
        </tr>
        <wssuc:inputformsection id="UploadSection" runat="server">
            <template_inputformcontrols>
              <wssuc:InputFormControl id="UploadFormControl" runat="server">
                <Template_control> 
                    <asp:Literal runat="server" ID="litNameDescription" />
                    <div style="padding: 5px 0 0 10px;">
                        <asp:FileUpload runat="server" ID="UploadExcel" />
                    </div>
                    <div style="padding: 5px 0 0 10px; color:Red;">
                    <asp:Label ID="FileError" runat="server"></asp:Label></div>
                </Template_control>
              </wssuc:InputFormControl>
             </template_inputformcontrols>
        </wssuc:inputformsection>
        <tr>
            <td height="1px" class="ms-sectionline" colspan="2">
            </td>
        </tr>
    </table>
    <wssuc:buttonsection runat="server" topbuttons="true" bottomspacing="5" showsectionline="false"
        showstandardcancelbutton="false">
        <template_buttons>
              <asp:Button runat="server" ID="UploadButton" class="ms-ButtonHeightWidth" OnClientClick="showLoad();return true;"/> 
              <asp:Button runat="server" ID="UploadCancelButton" class="ms-ButtonHeightWidth" OnClientClick="cancel();return false;" UseSubmitBehavior="false" />
        </template_buttons>
    </wssuc:buttonsection>  
    <span id="loadinggif" style="position: relative; top:-18px; left:350px;display: none;">
        <img src="/_layouts/images/UE.SharePoint.ImportExport/uploading.gif" alt="" />
    </span> 
    <asp:Literal runat="server" ID="litJavascript"></asp:Literal>
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <wssawc:EncodedLiteral EncodeMethod="HtmlEncode" ID="UploadPageTilte" runat="server"></wssawc:EncodedLiteral>
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea"
    runat="server">
    <asp:Label ID="LblBreadcrumbTitle" runat="server" Text=""></asp:Label>
</asp:Content>
<asp:Content ID="SiteNavigator" ContentPlaceHolderID="PlaceHolderTitleBreadcrumb"
    runat="server"> 
</asp:Content>
